﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EasyCommServer.Core
{
    class SharedDefines
    {
        public static string ConnectionString
        {
            get
            {
                return System.Configuration.ConfigurationManager.ConnectionStrings["SqlConnString"].ConnectionString;
;
            }
        }

    }

    public partial class Client
    {
        //Command ID's
        public const int IM_Hello = 2012;      // Hello
        public const int IM_OK = 0;           // OK
        public const int IM_Login = 1;        // Login
        public const int IM_Register = 2;     // Register
        public const int IM_TooUsername = 3;  // Too long username
        public const int IM_TooPassword = 4;  // Too long password
        public const int IM_Exists = 5;       // Already exists
        public const int IM_NoExists = 6;     // Doesn't exists
        public const int IM_WrongPass = 7;    // Wrong password
        public const int IM_IsAvailable = 8;  // Is user available?
        public const int IM_Send = 9;         // Send message
        public const int IM_Received = 10;    // Message received

        enum ReturnCodes
        {
            EC_INVLAID_PASSWORD,
            EC_INCORRECT_USERNAME,
            EC_INCORRECT_USERNAME_OR_PASSWORD,
            EC_LOGIN_FAILED,
            OK = 0,

        };
    }
}
